<%
%><%@include file="/libs/foundation/global.jsp"%><%
%>
<cq:includeClientLib js="myproject.components" />
<cq:includeClientLib css="myproject.components" />

<%@ page import="java.util.Iterator,
        com.day.text.Text,
        com.day.cq.wcm.api.PageFilter,
        com.day.cq.wcm.api.Page,
        com.day.cq.commons.Doctype,
        org.apache.commons.lang.StringEscapeUtils " %><%

// get navigation root page Page

String[] p = properties.get("pages",String[].class);

String li="";
String slides="";
int i=0;
  try{

    if(p.length>0){
for(String eachproperty:p){
    i++;
    li=li+"<li><a href=\'#\'>"+ i +"</a></li>";
    slides=slides+"<div id=\'slide\' class=\'slide\'><iframe style=\"overflow: hidden;\" height=\"499px\" width=\"763px\" src=\""+ eachproperty +".html \"> </iframe> </div>";
}
%>
<div id='slideshow-wrapper'>
    <div id='slideshow'>
    <div class='nav' align='center'>
        <ul>
            <%=li %>
        </ul>
    </div>
    <div class='sideNav'>
        <a class='prevSlide' href='#'>Previous Slide</a>
        <a class='nextSlide' href='#'>Next Slide</a>
    </div>
        <div id="reel">
            <%=slides %>
        </div>
    </div>
</div>
<div style="clear:both"></div>
<% }else { %>
choose some slides
<% }


} catch (Exception e) {
out.print("Choose one or more slides to show");
}
%>